from django.db import models

# Create your models here.
from user.models import User

"""姓名、性别、生份证号、手
机号、从业证书编号、所在医院、科室、资质（普通，专家等）、医生执照有效期、发证机构"""
class Doctoc(models.Model):

    user = models.OneToOneField(User, on_delete=models.CASCADE,verbose_name='用户')
    name = models.CharField(max_length=20, verbose_name='姓名')
    gender = models.CharField(max_length=20,default="man",verbose_name='性别')
    mobile = models.CharField(max_length=11, unique=True, verbose_name='手机号')
    id_no = models.IntegerField(default=0, verbose_name='从业证书编号')
    hospital = models.IntegerField(default=0, verbose_name='医院编号')
    hospitalname = models.CharField(max_length=40, verbose_name='医院名称')
    subject = models.CharField(max_length=20, verbose_name='科室')

    class Meta:
        db_table = 'doctors'
        verbose_name = '医生'
        verbose_name_plural = verbose_name